<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Abalone-首页</title>
    <!--    <script src="../static/js/vendor/modernizr-2.6.2.min.js" th:src="@{/js/vendor/modernizr-2.6.2.min.js}"></script>-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" th:href="@{/lib/editormd/css/editormd.min.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
    <link href="https://ae01.alicdn.com/kf/U99de1a80dcaa49dca794b6b5ce291106P.jpg"
          th:href="@{https://ae01.alicdn.com/kf/U99de1a80dcaa49dca794b6b5ce291106P.jpg}" rel="icon" type="image/x-ico">
</head>
<body>
<!--导航-->
<nav id="nav" class="gird-header ui inverted attached segment  ">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui blue header item" style="font-family: STSong">Abalone</h2>
            <!--<div class="right m-item item m-mobile-hide">-->
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide "><i
                    class="mini home icon"></i>首页</a>

            <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide"><i
                    class="mini idea icon"></i>分类</a>

            <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide"><i
                    class="mini tags icon"></i>标签</a>

            <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide"><i
                    class="mini clock icon"></i>时间线</a>

            <a href="#" th:href="@{/message}" class="m-item item"><i class="book icon"></i>留言板</a>

            <a href="#" th:href="@{/link}" class="m-item item m-mobile-hide"><i
                    class="mini linkify  icon"></i>&nbsp;友链</a>

            <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide"><i class="mini info icon"></i>关于我</a>

            <a href="" th:href="@{/admin/blogs}" class="m-item item m-mobile-hide"><i
                    class="mini desktop icon"></i>&nbsp;后台</a>
            <div class="right m-item m-mobile-hide menu">
                <div th:if="${session.user}==null">
                    <div class="text">
                        <a th:href="@{/login}">
                            <button class="ui button small grey">登录</button>
                        </a>
                        <a th:href="@{/register}">
                            <button class="ui button small grey">注册</button>
                        </a>
                    </div>
                </div>
                <div th:if="${session.user}!=null">
                    <div class="ui dropdown item">
                        <div class="text">
                            <t th:text="${session.user.username}">...</t>
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" th:href="@{/logout}" class="item">注销</a>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-hide" style="display: none">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--顶部图片-->
<div class="m-bg-class_outer" style="width: 100%;height: 750px">
    <!--    <img th:src="@{/images/bg.jpg}" alt="" class="ui m-bg image"-->
    <!--         style="width: 100%;height: 100%">-->
    <div class="m-bg-class_cover" align="center">
        <div class="m-margin-top-maxx" align="center">
            <img class="ui circular image" align="center"
                 th:src="@{https://ae01.alicdn.com/kf/U99de1a80dcaa49dca794b6b5ce291106P.jpg}"
                 style="width: 150px;height: 150px;">
        </div>
        <div class="m-font-size-title-large" align="center">Abalone</div>
        <h3 id="text" class="m-font-size-text" align="center"></h3>
        <hr style="width: 20%">
        <div class="" align="center">
            <a href="#" class="ui wechat circular icon button"><i class="weixin icon"></i></a>
            <a href="#" class="ui qq circular icon button" data-content="958324611" data-position="bottom center"><i
                    class="qq icon"></i></a>
            <a href="https://github.com/gavy26/" target="_blank" class="ui github circular icon button"
               data-content="点击跳转GitHub" data-position="bottom center"><i class="github icon"></i></a>
            <a href="https://blog.csdn.net/cgy_gavy" target="_blank" class="ui csdn circular icon button"
               data-content="点击跳转CSDN" data-position="bottom center"><i class="copyright outline icon"></i></a>
            <a href="#" class="ui email circular icon button" data-content="gy958324611@hotmail.com"
               data-position="bottom center"><i class="envelope  icon"></i></a>
        </div>

        <div class="ui wechat-qr flowing popup transition hidden">

            <div align="center">Wechat:Miao10178</div>
        </div>
        <div class="ui qq-qr flowing popup transition hidden">

            <div align="center">QQ:958324611</div>
        </div>
    </div>

</div>


<!--中间内容-->
<div class="m-container-mini m-padded-tb-big animated fadeIn">
    <div class="ui container">
        <div class="ui stackable grid">
            <!--左边博客列表-->
            <div class="twelve wide column">
                <!--header-->
                <div class="ui top attached segment m-opacity">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <h3 class="ui violet header">博客</h3>
                        </div>
                        <div class="right aligned column">
                            共 <h2 class="ui orange header m-inline-block m-text-thin"
                                  th:text="${page.totalElements}">
                            14 </h2> 篇
                        </div>
                    </div>
                </div>

                <!--content-->
                <div class="ui attached segment m-opacity">
                    <div class="ui padded vertical segment m-padded-tb-large" th:each="blog : ${page.content}">
                        <div class="ui middle aligned mobile reversed stackable grid">
                            <div class="eleven wide column">
                                <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}"
                                                         target="_blank"
                                                         class="m-black" th:text="${blog.title}"></a></h3>
                                <p class="m-text" th:text="|${blog.description}......|"></p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui small horizontal link list">
                                            <div class="item">
                                                <div class="content"><a href="#" class="header"
                                                                        th:text="${blog.user.nickname}"></a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i><span
                                                    th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}"></span>
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> <span th:text="${blog.views}"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a href="#" target="_blank"
                                           class="ui violet basic label m-padded-tiny m-text-thin"
                                           th:text="${blog.type.name}"></a>
                                    </div>
                                </div>
                            </div>

                            <div class="five wide column">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img src="https://unsplash.it/800/450?image=1005"
                                         th:src="@{${blog.firstPicture}}"
                                         alt="" class="ui rounded image">
                                </a>
                            </div>

                        </div>
                    </div>
                </div>

                <!--footer-->
                <div class="ui bottom attached segment m-opacity" th:if="${page.totalPages}>1">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <a href="#" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}"
                               class="ui mini violet basic button">上一页</a>
                        </div>
                        <div class="right aligned column">
                            <a href="#" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}"
                               class="ui mini violet basic button">下一页</a>
                        </div>
                    </div>
                </div>

            </div>

            <!--右边的top-->
            <div class="four wide column">
                <!--b站的信息-->
                <div class="ui segments ">
                    <div class="ui secondar segment m-opacity">
                        <div class="column">
                            <i class="user icon"></i>个人信息
                        </div>
                    </div>
                    <div class="ui violet segment m-opacity">
                        <img class="ui bordered rounded centered image"
                             th:src="@{https://ae01.alicdn.com/kf/U99de1a80dcaa49dca794b6b5ce291106P.jpg}"
                             style="width: 100px;height: 100px;">
                        <div class="column">
                            <a target="_blank" th:href="@{https://space.bilibili.com/411498228}"><h2 align="center">
                                Abalone</h2></a>
                            <div align="center">Code changes the world</div>
                            Abalone,折腾于0&1世界中的憨憨?
                            <p>
                            <h3>B站信息:</h3>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Followers:
                            <span th:text="${follower}"></span><br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Likes:
                            <span th:text="${likes}"></span><br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Views:
                            <span th:text="${view}"></span><br>
                            </p>
                        </div>
                    </div>
                </div>
                <!--分类-->
                <div class="ui segments m-opacity">
                    <div class="ui secondary segment ">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="idea icon"></i>分类
                            </div>
                            <div class="right aligned column">
                                <a href="#" th:href="@{types/-1}" target="_blank">more <i
                                        class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui violet segment">
                        <div class="ui fluid vertical menu">
                            <a href="#" th:href="@{/types/{id}(id=${type.id})}" target="_blank" class="item"
                               th:each="type : ${types}">
                                <span th:text="${type.name}"></span>
                                <div class="ui violet basic left pointing label"
                                     th:text="${#arrays.length(type.blogs)}">13
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
                <!--最新推荐-->
                <div class="ui segments m-margin-top-large m-opacity">
                    <div class="ui secondary segment ">
                        <div class="column">
                            <i class="bookmark icon"></i>最新推荐
                        </div>
                    </div>
                    <div class="ui segment" th:each="blog : ${recommendBlogs}">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"
                           class="m-black m-text-thin"
                           th:text="${blog.title}">用户故事（User Story）</a>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<br>
<br>
<br>
<!--底部栏-->
<!--底部footer-->
<footer class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img th:src="@{/images/wechat1.jpg}" class="ui rounded image" alt=""
                             style="width: 110px">
                    </div>
                </div>
            </div>

            <div class="four wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">关于我</h4>
                <div class="ui inverted link list">
                    <a href="https://space.bilibili.com/411498228" class="item m-text-thin">bilibili</a>
                    <a href="https://github.com/gavy26" class="item m-text-thin">github</a>
                    <a href="https://blog.csdn.net/cgy_gavy" class="item m-text-thin">CSDN</a>
                </div>
            </div>
            <div class="four wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item m-text-thin">Email：gy958324611@hotmail.com</a>
                    <a href="#" class="item m-text-thin">QQ：958324611</a>
                </div>
            </div>
            <div class="four wide column">
                <!--博客运行时间统计-->
                <h4 class="ui inverted header m-text-thin m-text-spaced ">Abalone信息</h4>
                <div id="blog-message">
                    <div class="ui inverted link list" style="align-content: center;margin-top: 10px">
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px;">
                            文章总数： <h2 class="ui orange header m-inline-block m-margin-top-null"
                                      style="font-size:medium;" th:text="${page.totalElements}"> 14 </h2> 篇
                        </div>
                    </div>
                </div>
                <p class="m-text-thin m-text-spaced m-opacity-mini" style="text-align: left">
                    &nbsp;&nbsp;&nbsp;这是我的个人博客、会分享关于编程、思考相关的任何内容，希望可以给来到这儿的人有所帮助...</p>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <div style="color: #F08047;margin-top: -18px" class="ui inverted m-text-thin m-text-spaced">Abalone已运行: <span
                id="htmer_time" class="item m-text-thin"></span> (*๓´╰╯`๓)
        </div>
        <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright © 2020 - 2021 Abalone Designed by Abalone</p>
    </div>
</footer>


<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/semantic.min.js}"></script>
<script th:src="@{/js/cursor.js}"></script>
<script th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
<script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/autoload.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css"/>

<!--<script th:src="@{/js/vendor/jquery-1.9.1.min.js}" src="../static/js/vendor/jquery-1.9.1.min.js"></script>-->
<script>
    // 运行时间统计
    function secondToDate(second) {
        if (!second) {
            return 0;
        }
        var time = new Array(0, 0, 0, 0, 0);
        if (second >= 365 * 24 * 3600) {
            time[0] = parseInt(second / (365 * 24 * 3600));
            second %= 365 * 24 * 3600;
        }
        if (second >= 24 * 3600) {
            time[1] = parseInt(second / (24 * 3600));
            second %= 24 * 3600;
        }
        if (second >= 3600) {
            time[2] = parseInt(second / 3600);
            second %= 3600;
        }
        if (second >= 60) {
            time[3] = parseInt(second / 60);
            second %= 60;
        }
        if (second > 0) {
            time[4] = second;
        }
        return time;
    }

    function setTime() {
        /*此处为网站的创建时间*/
        var create_time = Math.round(new Date(Date.UTC(2020, 03, 25, 15, 15, 15)).getTime() / 1000);
        var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
        currentTime = secondToDate((timestamp - create_time));
        currentTimeHtml = currentTime[0] + '年' + currentTime[1] + '天'
            + currentTime[2] + '时' + currentTime[3] + '分' + currentTime[4]
            + '秒';
        document.getElementById("htmer_time").innerHTML = currentTimeHtml;
    }

    setInterval(setTime, 1000);


    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-show');

    });

    // 显示公众号
    $('.tencent').popup({
        popup: $('.tencent-qr'),
        position: 'bottom center'
    });

    // 显示微信
    $('.wechat').popup({
        popup: $('.wechat-qr'),
        position: 'bottom center'
    });

    // 显示QQ
    $('.qq').popup({
        popup: $('.qq-qr'),
        position: 'bottom center'
    });

    // 显示邮箱
    $('.email').popup();

    // 显示CSDN
    $('.csdn').popup();

    // 显示github
    $('.github').popup();

    $('.ui.dropdown').dropdown({
        on: 'hover'
    });
</script>
<script th:src="@{/js/typing.js}"></script>

</body>
</html>